
version 13.1
log using fpa-robust-appendix-a,replace
use fpa-aid_bits_final,clear

grstyle init
grstyle set plain, nogrid noextend 

//figure a1
colorcor bit_ratf lnt_bit p_polity2 ln_gdppc wdi_gdpgr wdi_fdiin wdi_natrr lnpop conflict pta ally ///
unsc_member ln_distance colonial_tie coldwar if oecd_i==1&oecd_j==0&year>=1960&year<2013,nonsig(gs12) 
graph export fa1.pdf,replace

//figure a2
combineplot bit_ratf-coldwar if oecd_i==1&oecd_j==0&year>=1960&year<2013, combine(imargin(small)): histogram @y, freq yla(, ang(h)) col(gs12)
graph export fa2.pdf, replace

// figure a3
set more off
sort dyad year

quietly teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0

teffects overlap
graph export fa3.pdf, replace

log close